package com.zhixing.pay.client;

import com.zhixing.common.annotation.Driver;
import com.zhixing.common.annotation.Passenger;
import com.zhixing.common.utils.Res;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal;

@FeignClient("pay-service")
public interface PayClient {
    /**
     * 支付订单
     * @param realPayment 实际支付
     * @return 操作结果
     */
    @Passenger
    @PutMapping("/wallet/payOrder")
    Res<Void> payOrder(@RequestParam BigDecimal realPayment);

    /**
     * 司机打款
     * @param realIncome 实际收入
     * @return 操作结果
     */
    @Driver
    @PutMapping("/wallet/driverRemit")
    Res<Void> driverRemit(@RequestParam BigDecimal realIncome);
}
